/*
 * Copyright (c) 2015 smarthome.com All rights reserved. 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.web.property.utils;

import java.util.ResourceBundle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.smarthome.domain.common.Constants;

/**
 * web工具类
 * @author KongXiangyu
 * @since 2015-08-05
 */
public class WebUtil {

    private static Logger LOGGER = LoggerFactory.getLogger(WebUtil.class);
    private static ResourceBundle beanConfig = ResourceBundle.getBundle("conf/bean-config");
    private static String localRootPath = beanConfig.getString("domain.localRootPath");
    private static String staticRootPath = beanConfig.getString("domain.staticRootPath");

    public static String getLocalRootPath() {
        return localRootPath;
    }

    public static String getStaticRootPath() {
        return staticRootPath;
    }

    public static String getLocalPath(String file) {
        return localRootPath + file;
    }

    public static String getStaticFilePath(String file) {
        return staticRootPath + file + "?v=" + Constants.SYSTEM_START_TIME.getTime();
    }

}
